package com.qianyu.project.web.controller.zxm;

import com.qianyu.project.entity.SecurityCheckRectification;
import com.qianyu.project.service.ISecurityCheckRectificationService;
import com.qianyu.project.utils.Result;
import com.qianyu.project.utils.ResultTool;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author zxm
 * @date 2021/2/2 23:09
 */
@RestController
@RequestMapping("/SecurityCheck")
public class SecurityCheckController {
    @Autowired
    ISecurityCheckRectificationService iSecurityCheckRectificationService;
    @GetMapping("")
    public Result getSecurityCheck(SecurityCheckRectification ss){
          return ResultTool.success(iSecurityCheckRectificationService.getSecurityCheck(ss));
    }
    @DeleteMapping("{id}")
    public  void deleteSecurityCheckId(@PathVariable("id") String id){
        iSecurityCheckRectificationService.deleteSecurityCheckId(id);
    }
    @PostMapping("/addsecuritycheck")
    public  void addsecuritycheck(@RequestBody SecurityCheckRectification ss){
        System.out.println(ss);
        iSecurityCheckRectificationService.addsecuritycheck(ss);
    }
    @PutMapping("")
    public  void updateSecurityCheck(@RequestBody SecurityCheckRectification ss){
        iSecurityCheckRectificationService.updateSecurityCheck(ss);
    }
}
